package org.dwpd.mapper.user;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.dwpd.domain.user.User;
import org.dwpd.domain.user.UserDTO;
import org.dwpd.domain.user.UserFans;
import org.dwpd.domain.user.UserInfo;

import java.util.List;

@Mapper
public interface UserMapper {

    UserInfo selectUserDetailById(Integer userId);

    User queryByEmail(@Param("email") String email);

    UserInfo queryByEmailAndPassword(@Param("email") String email, @Param("password") String password);

    Integer insertUser(User user);

    Integer updatePasswordByEmail(@Param("email") String email, @Param("password") String password);

    Integer updateUserImage(Integer userId, String userImage);

    Integer updateBoardUserImage(Integer userId, String userImage);

    Integer updateUserInfo(UserInfo userInfo);

    List<UserDTO> selectUserByIds(List<Integer> ids);

    UserDTO selectById(@Param("id") Integer id);

    void addUserLevel(Integer userId);

    void addUserScore(Integer userId);

    void updateUserLevel();

    void addUserBlackList(Integer userId);

    Integer getUserFlagInBlack(Integer userId);

    void updateUserGrade(Integer overTimeNums, Integer accomplishNums, Integer userId);

    Integer updateBlackFlag();

    List<UserFans> selectFansByIds(List<Integer> ids);

    void updateUserGradeByTask();
}
